#!/bin/bash

repo=registry.jxit.net.cn:5000/uniserver/logstash-8.15.3-gelf-mysql

ver=$(git log --oneline . | wc -l)

http_proxy="--build-arg HTTP_PROXY=http://proxy.jxit.net.cn:5001"
https_proxy="--build-arg HTTPS_PROXY=http://proxy.jxit.net.cn:5001"

docker build $http_proxy $https_proxy . -t $repo:git-$ver

docker push $repo:git-$ver
